package com.action.boot.mongo.mongo_template.util;

import com.mongodb.DBObject;
import com.mongodb.util.JSON;

/**
 * Created by Wuxiang on 2017/11/1.
 */
public class Object2DBObject {
    public static DBObject change(Object o) {
        String json = JSON.serialize(o);
        return (DBObject) JSON.parse(json);
    }
}
